#ifndef TOKENS_H
#define TOKENS_H

#include <ctype.h>
#include <string.h>
#include <math.h>

/*
 * Definiciones de Cantidad Estados
 */

#define CANT_ESTADOS    34
#define CANT_SIMBOLOS   23

#define ESTADO_INICIAL   0

/*
 * Definicion de Mínimos y Máximos.
 */

#define MAX_ID         30
#define MAX_STRING     30
#define MIN_CTE_REAL    1.18e-38   // tome el valor del otro compilador, hay q ver que onda con el max y minimo de float
#define MAX_CTE_REAL    3.40e38 // tome el valor del otro compilador, hay q ver que onda con el max y minimo de float
#define CANT_PALABRAS_RESERVADAS 18
#define MAX_SIMBOLOS   100 
/*
 * Definiciones de Numero de Token
 */

#define ID                  0
#define CTE_NUM             1
#define CTE_REAL            2
#define CTE_STRING          3
#define PALABRA_RESERVADA   4
#define COMA			    5
#define DOS_PUNTOS          6
#define FIN_DE_LINEA        7

#define OP_COMP           100
#define OP_ASIG           101
#define OP_MENOR_IG       102
#define OP_MENOR          103
#define OP_MAYOR_IG       104
#define OP_MAYOR          105
#define OP_SUMA           106
#define OP_RESTA          107
#define OP_MULT           108
#define OP_DIV            109
#define OP_AND            110
#define OP_OR             111
#define OP_DIST           112
#define OP_NEG            113

#define PAR_ABRE          201
#define PAR_CIERRA        202
#define CORCH_ABRE        203
#define CORCH_CIERRA      204


/*
 * Definiciones de Variables Globales
 */

# define LONG_MAX_VAR 30

char CaracterLeido = '\0';
char CaracterAnterior = '\0';
int  yylval = 0;

char Contenido[LONG_MAX_VAR];

int TipoToken = 0;
int Indice = 0;
int Longitud = 0;

int ContComentario1 = 0;
int ContComentario2 = 0;

FILE* ArchFuente;
FILE* ArchSalida;


/******************************Declaracion variables de la TS**************************/

typedef struct{
               int posicion;
               char nombre[LONG_MAX_VAR];
               char tipo[LONG_MAX_VAR];
               char valor[LONG_MAX_VAR];
               int longitud;
               } RegistroTS;

RegistroTS TablaDeSimbolos[MAX_SIMBOLOS];
int CantSimbolos=0;

/******************************Fin declaracion variables de la TS**************************/

/*
void (*Procesos[CANT_ESTADOS][CANT_SIMBOLOS])();
int NuevoEstado[CANT_ESTADOS][CANT_SIMBOLOS];
*/

/* String de los Token */



/*
 * Inicio de definición de funciones
 */

char* palabras_reservadas[CANT_PALABRAS_RESERVADAS] =
{ "si", "ssi", "sino", "mientras", "que", "entonces", "inicio", "fin",
		"imprimir", "redondear", "truncar", "imprimir", "entero", "real",
		"texto", "enlista", "declaracion", "findeclaracion" };



/******************************Funciones de la TS**************************/
int BusquedaEnTS(char* Contenido)
{
    int ind;
    for (ind=0;ind<CantSimbolos;ind++)
        if (strcmp(TablaDeSimbolos[ind].nombre,Contenido) == 0)
                 return TablaDeSimbolos[ind].posicion;
    return -1;
}                 

int InsertarEnTS(RegistroTS registro)
{
    registro.posicion = CantSimbolos;
    strcpy(registro.tipo, "  ");
    registro.longitud = Longitud;
    TablaDeSimbolos[CantSimbolos] = registro;
    CantSimbolos++;
    
    return CantSimbolos-1;
}

void GrabarTS()
{
  FILE* TSimbolos;
  TSimbolos = fopen("TablaDeSimbolos.ts", "w");
	
  int ind;
  fprintf(TSimbolos,"%-30s %-30s %-30s %-30s %-30s\n","POSICION","NOMBRE","TIPO","VALOR","LONGITUD");
  for(ind=0;ind<CantSimbolos;ind++)   
     fprintf(TSimbolos, "%-30d %-30s %-30s %-30s %-30d\n", TablaDeSimbolos[ind].posicion,TablaDeSimbolos[ind].nombre, TablaDeSimbolos[ind].tipo, TablaDeSimbolos[ind].valor, TablaDeSimbolos[ind].longitud);
  fclose(TSimbolos);   
}     
/******************************Fin funciones de la TS**************************/       

char* strlwr( char* s )
{
  char* p = s;
  while (*p = tolower( *p )) p++;
  return s;
}

void Inic_id()
{
	Indice = 0;
	memset(Contenido, '\0', sizeof(Contenido));
	Contenido[Indice++] = CaracterLeido;

	Longitud = 1;
}

void Cont_id()
{
	Contenido[Indice++] = CaracterLeido;
	Longitud++;

	if (Longitud > MAX_ID)
	{
		printf("\n Error, Nombre de identificador mayor a %d caracteres \n",
				MAX_ID );
		exit(1);
	}

}

void Fin_id()
{

	if (es_palabra_reservada())
	{
		TipoToken = PALABRA_RESERVADA;
	}
	else
	{
		TipoToken = ID;

		//   llenar o agregar datos a la tabla de simbolos

		if((yylval = BusquedaEnTS(Contenido)) == -1)
         {
            RegistroTS registro;
            strcpy(registro.nombre, Contenido);
            strcpy(registro.valor, "  ");
            yylval = InsertarEnTS(registro);
         }


	}
}

void Inic_cte_num()
{
	Indice = 0;
	memset(Contenido, '\0', sizeof(Contenido));
	Contenido[Indice++] = CaracterLeido;
}

void Cont_cte_num()
{
	Contenido[Indice++] = CaracterLeido;
}

void Fin_cte_num()
{
	TipoToken = CTE_NUM;

	if (atof(Contenido) == HUGE_VAL || atof(Contenido) > MAX_CTE_REAL)
	{
		printf("\n Error, constante númerica mayor al maximo representable.\n");
		exit(1);
	}

	if (atof(Contenido) == HUGE_VAL || atof(Contenido) < MIN_CTE_REAL) // VER ATOF: if(atof(token) != 0 && atof(token) < MIN_CTE_REAL) nose porque hace esto
	{
		printf("\n Error, constante númerica menor al minimo representable.\n");
		exit(1);
	}

	//    llenar o agregar datos a la tabla de simbolos

    if((yylval = BusquedaEnTS(Contenido)) == -1)
     {
        RegistroTS registro;
        strcpy(registro.nombre, Contenido);
        strcpy(registro.valor, strcat(Contenido,".00"));
        yylval = InsertarEnTS(registro);
     }

}

void Inic_cte_real()
{
	Indice = 0;
	memset(Contenido, '\0', sizeof(Contenido));
	Contenido[Indice++] = CaracterLeido;
}

void Cont_cte_real()
{
	Contenido[Indice++] = CaracterLeido;
}

void Fin_cte_real()
{
	TipoToken = CTE_REAL;

	if (atof(Contenido) == HUGE_VAL || atof(Contenido) > MAX_CTE_REAL)
	{
		printf("\n Error, constante númerica mayor al maximo representable.\n");
		exit(1);
	}

	if (atof(Contenido) == HUGE_VAL || atof(Contenido) < MIN_CTE_REAL) // VER ATOF: if(atof(token) != 0 && atof(token) < MIN_CTE_REAL) nose porque hace esto
	{
		printf("\n Error, constante númerica menor al minimo representable.\n");
		exit(1);
	}

	//    llenar o agregar datos a la tabla de simbolos

	if((yylval = BusquedaEnTS(Contenido)) == -1)
    {
        RegistroTS registro;
        strcpy(registro.nombre, Contenido);
        strcpy(registro.valor,strcat(Contenido,"0"));//le agrego un 0 por las dudas que termine en punto
        yylval = InsertarEnTS(registro);
    }
}



void Inic_fin_linea()
{
    printf("Inic_fin_linea\n");
	Indice = 0;
	memset(Contenido, '\0', sizeof(Contenido));
	Contenido[Indice++] = CaracterLeido;
}

void Fin_linea()
{
    printf("Fin_linea\n");
	TipoToken = FIN_DE_LINEA;
}

void Inic_op_comp()
{
	Indice = 0;
	memset(Contenido, '\0', sizeof(Contenido));
	Contenido[Indice++] = CaracterLeido;
}

void Cont_op_comp()
{
	Contenido[Indice++] = CaracterLeido;
}

void Fin_op_comp()
{
	TipoToken = OP_COMP;
}

void Fin_op_asig()
{
	TipoToken = OP_ASIG;
}

void Inic_op_menor_ig()
{
	Indice = 0;
	memset(Contenido, '\0', sizeof(Contenido));
	Contenido[Indice++] = CaracterLeido;
}

void Cont_op_menor_ig()
{
	Contenido[Indice++] = CaracterLeido;
}

void Fin_op_menor_ig()
{
	TipoToken = OP_MENOR_IG;
}

void Fin_op_menor()
{
	TipoToken = OP_MENOR;
}

void Inic_op_mayor_ig()
{
	Indice = 0;
	memset(Contenido, '\0', sizeof(Contenido));
	Contenido[Indice++] = CaracterLeido;
}

void Cont_op_mayor_ig()
{
	Contenido[Indice++] = CaracterLeido;
}

void Fin_op_mayor_ig()
{
	TipoToken = OP_MAYOR_IG;
}

void Fin_op_mayor()
{
	TipoToken = OP_MAYOR;
}

void Inic_op_suma()
{
	Indice = 0;
	memset(Contenido, '\0', sizeof(Contenido));
	Contenido[Indice++] = CaracterLeido;
}

void Fin_op_suma()
{
	TipoToken = OP_SUMA;
}

void Inic_op_resta()
{
	Indice = 0;
	memset(Contenido, '\0', sizeof(Contenido));
	Contenido[Indice++] = CaracterLeido;
}

void Fin_op_resta()
{
	TipoToken = OP_RESTA;
}

void Inic_op_mult()
{
	Indice = 0;
	memset(Contenido, '\0', sizeof(Contenido));
	Contenido[Indice++] = CaracterLeido;
}

void Fin_op_mult()
{
	TipoToken = OP_MULT;
}

void Inic_op_div()
{
	Indice = 0;
	memset(Contenido, '\0', sizeof(Contenido));
	Contenido[Indice++] = CaracterLeido;
}

void Fin_op_div()
{
	TipoToken = OP_DIV;
}

int es_palabra_reservada()
{
	int i;

	for (i = 0; i < CANT_PALABRAS_RESERVADAS; i++)
	{
		if ( strcmp( (char *) strlwr(Contenido), palabras_reservadas[i]) == 0 )
		{
			return 1;
		}
	}

	return 0;
}

void Inic_para()
{
	memset(Contenido, '\0', sizeof(Contenido));
	Indice = 0;
	Contenido[Indice++] = CaracterLeido;
}

void Fin_para()
{
	TipoToken = PAR_ABRE;
}

void Inic_parc()
{
	memset(Contenido, '\0', sizeof(Contenido));
	Indice = 0;
	Contenido[Indice++] = CaracterLeido;
}

void Fin_parc()
{
	TipoToken = PAR_CIERRA;
}

void Inic_corcha()
{
	memset(Contenido, '\0', sizeof(Contenido));
	Indice = 0;
	Contenido[Indice++] = CaracterLeido;
}

void Fin_corcha()
{
	TipoToken = CORCH_ABRE;
}

void Inic_corchc()
{
	memset(Contenido, '\0', sizeof(Contenido));
	Indice = 0;
	Contenido[Indice++] = CaracterLeido;
}

void Fin_corchc()
{
	TipoToken = CORCH_CIERRA;
}

void Inic_op_and()
{
	memset(Contenido, '\0', sizeof(Contenido));
	Indice = 0;
	Contenido[Indice++] = CaracterLeido;
}

void Cont_op_and()
{
	Contenido[Indice++] = CaracterLeido;
}

void Fin_op_and()
{
	TipoToken = OP_AND;
}

void Inic_op_or()
{
	memset(Contenido, '\0', sizeof(Contenido));
	Indice = 0;
	Contenido[Indice++] = CaracterLeido;
}

void Cont_op_or()
{
	Contenido[Indice++] = CaracterLeido;
}

void Fin_op_or()
{
	TipoToken = OP_OR;
}

void Inic_coma()
{
	memset(Contenido, '\0', sizeof(Contenido));
	Indice = 0;
	Contenido[Indice++] = CaracterLeido;
}

void Fin_coma()
{
	TipoToken = COMA;
}

void Inic_cte_string()
{
	memset(Contenido, '\0', sizeof(Contenido));
	Indice = 0;
	Longitud = 0;
}

void Cont_cte_string()
{
	if (CaracterLeido != '"')
	{
		Contenido[Indice++] = CaracterLeido;
		Longitud++;
	}
}

void Fin_cte_string()
{
	TipoToken = CTE_STRING;
	if (Longitud > MAX_STRING)
	{
		printf("\n Error, constante string mayor a %d caracteres\n", MAX_STRING);
		exit(1);
	}
	
    if((yylval = BusquedaEnTS(Contenido)) == -1)
    {
        RegistroTS registro;
        strcpy(registro.nombre, Contenido);
        strcpy(registro.valor, Contenido);
        yylval = InsertarEnTS(registro);
    }

}

void Inic_op_dist()
{
	memset(Contenido, '\0', sizeof(Contenido));
	Indice = 0;
	Contenido[Indice++] = CaracterLeido;
}

void Cont_op_dist()
{
	Contenido[Indice++] = CaracterLeido;
}

void Fin_op_dist()
{
	TipoToken = OP_DIST;
}

void Inic_op_neg()
{
	memset(Contenido, '\0', sizeof(Contenido));
	Indice = 0;
	Contenido[Indice++] = CaracterLeido;
}

void Fin_op_neg()
{
	TipoToken = OP_NEG;
}

void Fin_dospuntos()
{
	TipoToken = DOS_PUNTOS;
}

void Comentario1()
{
	if (CaracterAnterior == ':' && CaracterLeido == '@')
		ContComentario1++;

	if (CaracterAnterior == '@' && CaracterLeido == ':')
		ContComentario1--;

	if (ContComentario1 > 0 && CaracterLeido == EOF)
	{
		printf(
				"Error, EOF dentro del primer nivel de comentario, comentario no balanceado \n");
		exit(1);
	}
}

void Comentario2()
{
	if (CaracterAnterior == ':' && CaracterLeido == '@')
		ContComentario2 = 1;

	if (CaracterAnterior == '@' && CaracterLeido == ':')
		ContComentario2--;

	if (ContComentario2 > 0 && CaracterLeido == EOF)
	{
		printf(
				"Error, EOF dentro del segundo nivel de comentario, comentario no balanceado \n");
		exit(1);
	}
}

void Error()
{

	printf("Error lexico \n");
	exit(1);
}

void Salta_caracter()
{
}


int NuevoEstado [CANT_ESTADOS][CANT_SIMBOLOS] =   {
 {1, 2, 3, -1, 5, 7, 9, 11, 12, 13, 14, 15, 16, 17, 19, 21, 23, 25, 26, 32, 33, 4, 0} , 
 {1, 1, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 2, 3, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 3, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 3, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 34, 6, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 34, 8, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 34, 10, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 17, 17, 17, 17, 17, 17, 17, 17, 17} , 
 {34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 34, 20, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 22, -1, -1, -1, -1, -1, -1, -1} , 
 {34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 24, -1, -1, -1, -1, -1, -1} , 
 {34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 27, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {27, 27, 27, 28, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 29, 27, 27, 27, 27} , 
 {27, 27, 27, 28, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 0, 27, 27, 27, 27} , 
 {27, 27, 27, 30, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27} , 
 {30, 30, 30, 31, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30} , 
 {30, 30, 30, 31, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 27, 30, 30, 30, 30} , 
 {34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34} , 
 {34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34}
 };

void (*Procesos[CANT_ESTADOS][CANT_SIMBOLOS])() = {
{Inic_id, Inic_cte_num, Inic_cte_real, Error, Inic_op_comp, Inic_op_menor_ig, Inic_op_mayor_ig, Inic_op_suma, Inic_op_resta, Inic_op_mult, Inic_op_div, Inic_para, Inic_parc, Inic_cte_string, Inic_op_dist, Inic_op_and, Inic_op_or, Inic_coma, Comentario1, Inic_corcha, Inic_corchc, Inic_fin_linea, Salta_caracter} , 
 {Cont_id, Cont_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id, Fin_id} , 
 {Fin_cte_num, Cont_cte_num, Cont_cte_real, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num, Fin_cte_num} , 
 {Fin_cte_real, Cont_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real, Fin_cte_real} , 
 {Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea, Fin_linea} , 
 {Fin_op_asig, Fin_op_asig, Fin_op_asig, Fin_op_asig, Cont_op_comp, Fin_op_asig, Fin_op_asig, Fin_op_asig, Fin_op_asig, Fin_op_asig, Fin_op_asig, Fin_op_asig, Fin_op_asig, Fin_op_asig, Fin_op_asig, Fin_op_asig, Fin_op_asig, Fin_op_asig, Fin_op_asig, Fin_op_asig, Fin_op_asig, Fin_op_asig, Fin_op_asig} , 
 {Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp, Fin_op_comp} , 
 {Fin_op_menor, Fin_op_menor, Fin_op_menor, Fin_op_menor, Cont_op_menor_ig, Fin_op_menor, Fin_op_menor, Fin_op_menor, Fin_op_menor, Fin_op_menor, Fin_op_menor, Fin_op_menor, Fin_op_menor, Fin_op_menor, Fin_op_menor, Fin_op_menor, Fin_op_menor, Fin_op_menor, Fin_op_menor, Fin_op_menor, Fin_op_menor, Fin_op_menor, Fin_op_menor} , 
 {Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig, Fin_op_menor_ig} , 
 {Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Cont_op_mayor_ig, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor, Fin_op_mayor} , 
 {Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig, Fin_op_mayor_ig} , 
 {Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma, Fin_op_suma} , 
 {Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta, Fin_op_resta} , 
 {Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult, Fin_op_mult} , 
 {Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div, Fin_op_div} , 
 {Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para, Fin_para} , 
 {Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc, Fin_parc} , 
 {Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string, Cont_cte_string} , 
 {Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string, Fin_cte_string} , 
 {Fin_op_neg, Fin_op_neg, Fin_op_neg, Fin_op_neg, Cont_op_dist, Fin_op_neg, Fin_op_neg, Fin_op_neg, Fin_op_neg, Fin_op_neg, Fin_op_neg, Fin_op_neg, Fin_op_neg, Fin_op_neg, Fin_op_neg, Fin_op_neg, Fin_op_neg, Fin_op_neg, Fin_op_neg, Fin_op_neg, Fin_op_neg, Fin_op_neg, Fin_op_neg} , 
 {Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist, Fin_op_dist} , 
 {Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Cont_op_and, Error, Error, Error, Error, Error, Error, Error} , 
 {Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and, Fin_op_and} , 
 {Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Error, Cont_op_or, Error, Error, Error, Error, Error, Error} , 
 {Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or, Fin_op_or} , 
 {Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma, Fin_coma} , 
 {Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Comentario1, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos, Fin_dospuntos} , 
 {Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario2, Comentario1, Comentario1, Comentario1, Comentario1} , 
 {Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario2, Comentario1, Comentario1, Comentario1, Comentario1} , 
 {Comentario1, Comentario1, Comentario1, Comentario2, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario1, Comentario2, Comentario1, Comentario1, Comentario1, Comentario1} , 
 {Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2} , 
 {Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario2, Comentario1, Comentario2, Comentario2, Comentario2, Comentario2} , 
 {Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha, Fin_corcha} , 
 {Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc, Fin_corchc} 
};


void initEstados()
{
}

#endif
